package com.tuanzi.loan.business.repository.push;

import com.tuanzi.loan.business.constants.push.LoanPushMessageSendTaskStatus;
import com.tuanzi.loan.business.entity.push.LoanPushMessageSendTask;
import com.tuanzi.loan.business.repository.push.custom.LoanPushMessageSendTaskCustomRepository;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Date;

/**
 * @Author: chenweijun
 * @Date: 2018/12/12 14:38
 * @Description:
 */
public interface LoanPushMessageSendTaskRepository extends LoanPushMessageSendTaskCustomRepository, JpaRepository<LoanPushMessageSendTask, Long>{


    Long countByStatus(LoanPushMessageSendTaskStatus status);

    LoanPushMessageSendTask findTopByStatusAndSendTimeBefore(LoanPushMessageSendTaskStatus status, Date sendTime);

}
